home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIHttpAuthManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  9KB  |  179 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIHttpAuthManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIHttpAuthManager_h__
  6. #define __gen_nsIHttpAuthManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIHttpAuthManager */
  19. #define NS_IHTTPAUTHMANAGER_IID_STR "7ce8e9d1-8b4b-4883-a307-66fe12a50153"
  20.  
  21. #define NS_IHTTPAUTHMANAGER_IID \
  22.   {0x7ce8e9d1, 0x8b4b, 0x4883, \
  23.     { 0xa3, 0x07, 0x66, 0xfe, 0x12, 0xa5, 0x01, 0x53 }}
  24.  
  25. /**
  26.  * nsIHttpAuthManager
  27.  *
  28.  * This service provides access to cached HTTP authentication 
  29.  * user credentials (domain, username, password) for sites
  30.  * visited during the current browser session.
  31.  *
  32.  * This interface exists to provide other HTTP stacks with the
  33.  * ability to share HTTP authentication credentials with Necko.
  34.  * This is currently used by the Java plugin (version 1.5 and
  35.  * higher) to avoid duplicate authentication prompts when the
  36.  * Java client fetches content from a HTTP site that the user
  37.  * has already logged into.
  38.  */
  39. class NS_NO_VTABLE nsIHttpAuthManager : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPAUTHMANAGER_IID)
  43.  
  44.   /**
  45.      * Lookup auth identity.
  46.      *
  47.      * @param aScheme
  48.      *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
  49.      *        this should be "http" (this includes authentication for SSL
  50.      *        tunneling).
  51.      * @param aHost
  52.      *        the host of the server issuing a challenge (ASCII only).
  53.      * @param aPort
  54.      *        the port of the server issuing a challenge.
  55.      * @param aAuthType
  56.      *        optional string identifying auth type used (e.g., "basic")
  57.      * @param aRealm
  58.      *        optional string identifying auth realm.
  59.      * @param aPath
  60.      *        optional string identifying auth path. empty for proxy auth.
  61.      * @param aUserDomain
  62.      *        return value containing user domain.
  63.      * @param aUserName
  64.      *        return value containing user name.
  65.      * @param aUserPassword
  66.      *        return value containing user password.
  67.      */
  68.   /* void getAuthIdentity (in ACString aScheme, in ACString aHost, in PRInt32 aPort, in ACString aAuthType, in ACString aRealm, in ACString aPath, out AString aUserDomain, out AString aUserName, out AString aUserPassword); */
  69.   NS_IMETHOD GetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, nsAString & aUserDomain, nsAString & aUserName, nsAString & aUserPassword) = 0;
  70.  
  71.   /**
  72.      * Store auth identity.
  73.      *
  74.      * @param aScheme
  75.      *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
  76.      *        this should be "http" (this includes authentication for SSL
  77.      *        tunneling).
  78.      * @param aHost
  79.      *        the host of the server issuing a challenge (ASCII only).
  80.      * @param aPort
  81.      *        the port of the server issuing a challenge.
  82.      * @param aAuthType
  83.      *        optional string identifying auth type used (e.g., "basic")
  84.      * @param aRealm
  85.      *        optional string identifying auth realm.
  86.      * @param aPath
  87.      *        optional string identifying auth path. empty for proxy auth.
  88.      * @param aUserDomain
  89.      *        optional string containing user domain.
  90.      * @param aUserName
  91.      *        optional string containing user name.
  92.      * @param aUserPassword
  93.      *        optional string containing user password.
  94.      */
  95.   /* void setAuthIdentity (in ACString aScheme, in ACString aHost, in PRInt32 aPort, in ACString aAuthType, in ACString aRealm, in ACString aPath, in AString aUserDomain, in AString aUserName, in AString aUserPassword); */
  96.   NS_IMETHOD SetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, const nsAString & aUserDomain, const nsAString & aUserName, const nsAString & aUserPassword) = 0;
  97.  
  98.   /**
  99.      * Clear all auth cache.
  100.      */
  101.   /* void clearAll (); */
  102.   NS_IMETHOD ClearAll(void) = 0;
  103.  
  104. };
  105.  
  106. /* Use this macro when declaring classes that implement this interface. */
  107. #define NS_DECL_NSIHTTPAUTHMANAGER \
  108.   NS_IMETHOD GetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, nsAString & aUserDomain, nsAString & aUserName, nsAString & aUserPassword); \
  109.   NS_IMETHOD SetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, const nsAString & aUserDomain, const nsAString & aUserName, const nsAString & aUserPassword); \
  110.   NS_IMETHOD ClearAll(void); 
  111.  
  112. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  113. #define NS_FORWARD_NSIHTTPAUTHMANAGER(_to) \
  114.   NS_IMETHOD GetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, nsAString & aUserDomain, nsAString & aUserName, nsAString & aUserPassword) { return _to GetAuthIdentity(aScheme, aHost, aPort, aAuthType, aRealm, aPath, aUserDomain, aUserName, aUserPassword); } \
  115.   NS_IMETHOD SetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, const nsAString & aUserDomain, const nsAString & aUserName, const nsAString & aUserPassword) { return _to SetAuthIdentity(aScheme, aHost, aPort, aAuthType, aRealm, aPath, aUserDomain, aUserName, aUserPassword); } \
  116.   NS_IMETHOD ClearAll(void) { return _to ClearAll(); } 
  117.  
  118. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  119. #define NS_FORWARD_SAFE_NSIHTTPAUTHMANAGER(_to) \
  120.   NS_IMETHOD GetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, nsAString & aUserDomain, nsAString & aUserName, nsAString & aUserPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAuthIdentity(aScheme, aHost, aPort, aAuthType, aRealm, aPath, aUserDomain, aUserName, aUserPassword); } \
  121.   NS_IMETHOD SetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, const nsAString & aUserDomain, const nsAString & aUserName, const nsAString & aUserPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAuthIdentity(aScheme, aHost, aPort, aAuthType, aRealm, aPath, aUserDomain, aUserName, aUserPassword); } \
  122.   NS_IMETHOD ClearAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAll(); } 
  123.  
  124. #if 0
  125. /* Use the code below as a template for the implementation class for this interface. */
  126.  
  127. /* Header file */
  128. class nsHttpAuthManager : public nsIHttpAuthManager
  129. {
  130. public:
  131.   NS_DECL_ISUPPORTS
  132.   NS_DECL_NSIHTTPAUTHMANAGER
  133.  
  134.   nsHttpAuthManager();
  135.  
  136. private:
  137.   ~nsHttpAuthManager();
  138.  
  139. protected:
  140.   /* additional members */
  141. };
  142.  
  143. /* Implementation file */
  144. NS_IMPL_ISUPPORTS1(nsHttpAuthManager, nsIHttpAuthManager)
  145.  
  146. nsHttpAuthManager::nsHttpAuthManager()
  147. {
  148.   /* member initializers and constructor code */
  149. }
  150.  
  151. nsHttpAuthManager::~nsHttpAuthManager()
  152. {
  153.   /* destructor code */
  154. }
  155.  
  156. /* void getAuthIdentity (in ACString aScheme, in ACString aHost, in PRInt32 aPort, in ACString aAuthType, in ACString aRealm, in ACString aPath, out AString aUserDomain, out AString aUserName, out AString aUserPassword); */
  157. NS_IMETHODIMP nsHttpAuthManager::GetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, nsAString & aUserDomain, nsAString & aUserName, nsAString & aUserPassword)
  158. {
  159.     return NS_ERROR_NOT_IMPLEMENTED;
  160. }
  161.  
  162. /* void setAuthIdentity (in ACString aScheme, in ACString aHost, in PRInt32 aPort, in ACString aAuthType, in ACString aRealm, in ACString aPath, in AString aUserDomain, in AString aUserName, in AString aUserPassword); */
  163. NS_IMETHODIMP nsHttpAuthManager::SetAuthIdentity(const nsACString & aScheme, const nsACString & aHost, PRInt32 aPort, const nsACString & aAuthType, const nsACString & aRealm, const nsACString & aPath, const nsAString & aUserDomain, const nsAString & aUserName, const nsAString & aUserPassword)
  164. {
  165.     return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167.  
  168. /* void clearAll (); */
  169. NS_IMETHODIMP nsHttpAuthManager::ClearAll()
  170. {
  171.     return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173.  
  174. /* End of implementation class template. */
  175. #endif
  176.  
  177.  
  178. #endif /* __gen_nsIHttpAuthManager_h__ */
  179.